import 'package:flutter/material.dart';
import 'package:herotest/heroAnimate.dart';

import 'ac.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      //home: MyHomePage(),
      // home: HeroAnimation(photos: <String>[
      //   "images/gooman.png",
      //   "images/logo.png",
      //   "images/ppp_n.jpg",
      //   "images/logo.jpg",
      // ],),
      home:Ac()
    );
  }
}

class MyHomePage extends StatelessWidget {
  final List<IconData> list = const [Icons.title, Icons.toc, Icons.toll];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: <Widget>[
            for (var icon in list) HeroApp(icon: icon),
          ],
        ),
      ),
    );
  }
}

class HeroApp extends StatelessWidget {
  final IconData icon;

  const HeroApp({Key key, this.icon}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return FlatButton(
      splashColor: Colors.red,
      child: Hero(
        tag: icon,
        child: Icon(
          icon,
        ),
      ),
      onPressed: () {},
    );
  }
}
